package com.zk.algorithm.others;

import com.zk.algorithm.annotation.Easy;
import com.zk.algorithm.annotation.LeetCodeExplore;

/**
 * @author zk
 */
@LeetCodeExplore
@Easy
public class HammingDistance {

    public int hammingDistance(int x, int y) {
        int k = x ^ y;

        return new NumberOf1Bits().hammingWeight2(k);
    }

}
